{{- $fullName := include "secrets.fullname" . -}}
{{- range $path, $bytes := .Files.Glob "files/ssh-auth/*" }}
{{- $name := base $path }}
{{- if not (hasSuffix ".pub" $path) }}
apiVersion: v1
kind: Secret
type: kubernetes.io/ssh-auth
metadata:
  name: {{ $fullName }}-{{ $name }}
data:
  ssh-privatekey: {{ ($.Files.Get $path) | b64enc | nindent 4 }}
---
{{- end }}
{{- end }}
